import { ref } from "vue";

<template>
  <div class="tags-button">
    <div class="tags-button-title">
      <div class="tags-button-title-left">
        <img class="tags-button-title-left-icon" src="./assets/组 43@2x.png" alt="">
      </div>
      <div class="tags-button-title-right">
        <div class="tags-button-title-right-header">
          <div class="tags-button-title-right-header-text">{{ tagsTitle }}</div>
          <div class="tags-button-title-right-header-icon1">{{ tags2 }}</div>
          <div class="tags-button-title-right-header-icon2">{{ tags3 }}</div>
        </div>
        <div class="tags-button-title-right-footer">{{ tags4 }}</div>
      </div>
    </div>
    <div class="tags-button-center">
      <div class="tags-button-center-nums1">IP资产数：<span class="span-nums">{{ nums1 }}</span></div>
      <div class="tags-button-center-nums2">域名资产数：<span class="span-nums">{{ nums2 }}</span></div>
    </div>
    <div class="tags-button-bottom">更新时间：<span>{{ time1 }}</span></div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

const tagsTitle = ref('行政上传的')
const tags2 = ref('内置')
const tags3 = ref('手动上传')
const tags4 = ref('行政上报（办）的资产数据会打上字标签')
const nums1 = ref(0)
const nums2 = ref(0)
const time1 = ref('2024/10/10 14:30:00')
</script>

<style lang="less" scoped>
.tags-button {
  width: 280px;
  height: 183px;
  border-radius: 4px;
  flex-grow: 1;
  box-sizing: border-box;
  border-width: 0px 1px 1px 1px;
  border-style: solid;
  border-color: #E9EBEF;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.08);
  padding: 20px 16px 8px 16px;
  border-top: 4px solid #2677FF;
  position: relative;

  .tags-button-title {
    width: 248px;
    height: 48px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    border-bottom: 1px solid #E9EBEF;
    padding-bottom: 10px;

    .tags-button-title-left {
      width: 48px;
      height: 48px;
      border-radius: 4px;
      background: linear-gradient(135deg, #B9D3FF 0%, #EEF4FF 100%);
      padding: 11px 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;

      .tags-button-title-left-icon {
        width: 28px;
        height: 26px;
        border-radius: 1px;
        box-sizing: border-box;
        border: NaNpx solid;
        border-image: radial-gradient(100% 100% at 50% 0%, #C0D9FF 0%, #64A6FF 100%) NaN;
      }
    }

    .tags-button-title-right {
      width: 192px;
      height: 48px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex-grow: 1;
      z-index: 1;

      .tags-button-title-right-header {
        width: 192px;
        height: 24px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        align-self: stretch;

        .tags-button-title-right-header-text {
          width: 76px;
          height: 22px;
          font-family: PingFang SC;
          font-size: 16px;
          font-weight: 500;
          line-height: 22px;
          white-space: nowrap; // 禁止文本换行
          overflow: hidden; // 隐藏超出的内容
          text-overflow: ellipsis; // 显示省略号
          color: #37393C;
        }

        .tags-button-title-right-header-icon1 {
          padding: 3.5px 8px;
          font-family: PingFang SC;
          font-size: 12px;
          font-weight: normal;
          line-height: normal;
          font-variation-settings: "opsz" auto;
        }

        .tags-button-title-right-header-icon2 {
          padding: 3.5px 8px;
          font-family: PingFang SC;
          font-size: 12px;
          font-weight: normal;
          line-height: normal;
          letter-spacing: 0em;
          font-variation-settings: "opsz" auto;
        }
      }

      .tags-button-title-right-footer {
        width: 192px;
        font-family: PingFang SC;
        font-size: 14px;
        font-weight: normal;
        line-height: 20px;
        letter-spacing: 0px;
        white-space: nowrap; // 禁止文本换行
        overflow: hidden; // 隐藏超出的内容
        text-overflow: ellipsis; // 显示省略号
        color: #A8ACB3;
      }
    }

  }

  .tags-button-center {
    .tags-button-center-nums1 {
      text-align: left;
      height: 20px;
      font-family: PingFang SC;
      font-size: 14px;
      font-weight: normal;
      line-height: 20px;
      letter-spacing: 0px;
      color: #62666C;
      margin-bottom: 8px;
    }

    .tags-button-center-nums2 {
      text-align: left;
      height: 20px;
      font-family: PingFang SC;
      font-size: 14px;
      font-weight: normal;
      line-height: 20px;
      letter-spacing: 0px;
      color: #62666C;
    }
  }

  .tags-button-bottom {
    box-sizing: border-box;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 278px;
    height: 32px;
    opacity: 1;

    background: #F5F8FC;
    font-family: PingFang SC;
    font-size: 12px;
    font-weight: normal;
    line-height: 16px;
    letter-spacing: 0px;
    padding-left: 16px;
    text-align: left;
    color: #A8ACB3;
    display: flex;
    align-items: center;
  }
}

.span-nums {
  font-family: PingFang SC;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0px;
  font-variation-settings: "opsz" auto;
  color: #2677FF;
}
</style>